package HDFSTest;

import org.simgrid.msg.Task;

public class IORequest extends Task {
	private String fileName;
	private Data<?> data;
	private boolean write;

	public IORequest(String name, long size, boolean write, String fileName, Data<?> data) {
		super(name, 0, size);
		this.fileName = fileName;
		this.write = write;
		this.data = data;
	}

	public IORequest(String name, boolean write, String fileName, Data<?> data) {
		this(name, 0, write, fileName, data);
	}

	public IORequest(String name, String fileName) {
		this(name, false, fileName, null);
	}

	/**
	 * @return the fileName
	 */
	public String getFileName() {
		return fileName;
	}

	/**
	 * @param fileName
	 *            the fileName to set
	 */
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	/**
	 * @return the data
	 */
	public Data<?> getData() {
		return data;
	}

	/**
	 * @param data
	 *            the data to set
	 */
	public void setData(Data<?> data) {
		this.data = data;
	}

	/**
	 * @return the write
	 */
	public boolean isWrite() {
		return write;
	}

}
